package com.zyh.preview.test;

public class MyDate {
    public int year;
    public int month;
    public int day;

    public void showDate(int year, int month, int day) {
        System.out.println("日期：" + year + "年" + month + "月" + day + "日");
    }

    public boolean isLeapYear(int year) {
        if (!(year % 100 != 0 && year % 4 == 0 || year % 400 == 0 && year % 100 == 0)) {
            return false;
        }
        return true;
    }
}
